function b = subsref(s,index)
% SUBSREF Define field name indexing for  objects
switch index.type
    case '()'
        error('Unsupported');
    case '.'
        switch index.subs
            case 'r2'
                b = var(h);
            case 'm2'
                slope = [h(1)-h(end),diff(h)]./dx;
                b = var(slope);
        end
end